-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: optimize circom proof generation #469
Conversation
ccd330e
to
7531107
Compare
7531107
to
bd59258
Compare
In 134c146, "not moved" -> "not be moved" would be better. |
In 63d388a, there is a typo "pref" -> "perf". |
9ad620b
to
84b4bd3
Compare
84b4bd3
to
46acc2f
Compare
This adjustment aims to remove the overhead associated with parsing zkey.
46acc2f
to
589c16b
Compare
589c16b
to
aab44e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This adjustment aims to remove the overhead associated with parsing zkey.
BREAKING CHANGE: The alignment requirement for `BigInt` is removed. This alignment was originally inherited from the era-bellman-cuda project (see: https://github.com/matter-labs/era-bellman-cuda/blob/b52127574e67f4c7938890eab0670ae75f49c22f/src/ff_storage.cuh#L6). The specific reason for this alignment requirement is unclear, and its presence necessitates parsing the ZKey.
Since `VerifyingKey` is used in proof generation, it should not be moved.
To ensure that `c[i] = a[i] * b[i]` is executed correctly, `a[i]` and `b[i]` must be fully computed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
aab44e1
to
ac858d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1. Avoid parsing into intermediate `circom::ConstraintMatrices`. Instead, it just takes pointer to `circom::Coefficient`. 2. Parallelize dividing by R. 3. Avoid computing unused `a_num_non_zero` and `b_num_non_zero`.
ac858d5
to
6862c02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is a missing change from PR #469.
This is a missing change from PR #469.
This is a missing change from PR #469.
This is a missing change from PR #469.
This is a missing change from PR #469.
Description
This PR optimizes circom proof generation by avoiding parsing
zkey
andwtns
files.Related: #460